home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / bench / x.txt / 000115_fdc@watsun.cc.columbia.edu_Mon Nov 5 10:36:42 EST 2001.msg < prev    next >
Text File  |  2020-01-01  |  4KB  |  96 lines

  1. Article: 12933 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
  3. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.unix.sco.misc,comp.protocols.kermit.misc
  5. Subject: Re: Dropping DTR in OSR5
  6. Date: 5 Nov 2001 15:37:18 GMT
  7. Organization: Columbia University
  8. Lines: 79
  9. Message-ID: <9s6bne$p3k$1@newsmaster.cc.columbia.edu>
  10. References: <9s40rp$fdh$1@newsmaster.cc.columbia.edu> <20011104160917.A13779@mammoth.ca.caldera.com> <9s4qjp$30k$1@newsmaster.cc.columbia.edu> <20011104195143.B13779@mammoth.ca.caldera.com>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1004974638 25716 128.59.39.2 (5 Nov 2001 15:37:18 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 5 Nov 2001 15:37:18 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.unix.sco.misc:139901 comp.protocols.kermit.misc:12933
  16.  
  17. In article <20011104195143.B13779@mammoth.ca.caldera.com>,
  18. Bela Lubkin  <belal@caldera.com> wrote:
  19. : ...
  20. : The devsys engineers at SCO (and perhaps today at Caldera) believed that
  21. : if you asked for POSIX compliance, you were asking the devsys to act as
  22. : a filter to prevent you from doing anything that wasn't specified in the
  23. : POSIX standard(s) in question...
  24. :
  25. Right.  It's not a criticism of SCO; it's a criticism of POSIX.  Most of
  26. the things that communication software needs to do are forbidden by POSIX.
  27.  
  28. : Hmmm, I would expect Kermit to just work with 3rd party drivers on OSR5.
  29. : Device names?  Kermit shouldn't care -- if I tell it "let's talk on
  30. : /dev/ttyi13A" it should say "ok, boss".
  31. :
  32. I don't have my notes handy at the moment, but as I recall the problem
  33. comes when a driver supports hundreds of serial ports, thus stressing the
  34. SCO port-naming conventions and lockfile-name-devising algorithm.
  35.  
  36. : > In fact DTR comes back on, but RTS stays down, just as without the kludge.
  37. : > The kludge does make a difference in 5.0.5, however: it makes it act like
  38. : > 5.0.2 (without the kludge in 5.0.5, both DTR and RTS stayed down).
  39. : Oh well.
  40. I tried one last trick this morning.  It doesn't work either, but I don't
  41. know why.  Maybe somebody can explain it.  Last night I said:
  42.  
  43. : > ...(and of course the problem with closing the device is that you've
  44. : > lost all the myriad setups you've done on it when you reopen it).
  45.  
  46. But after posting that I realized that in the POSIX environment (unlike in
  47. BSD or System V) everything you need to know about the port is in one place:
  48. the attribute struct.  So the following should work:
  49.  
  50.   tcgetattr(ttyfd, &ttcur);
  51.   close(ttyfd);
  52.   (pause)
  53.   ttyfd = open(name,O_RDWR|O_NONBLOCK);
  54.   tcsetattr(ttyfd,TCSADRAIN,&ttcur);
  55.  
  56. Right?  Well, it does work insofar as it drops DTR and RTS for the desired
  57. interval and they both come on again.  However, any write() to the reopened
  58. device gets error 11, "Resource temporarily unavailable".
  59.  
  60. : > In short there seems to be no way to do this in OSR5 prior to 5.0.6a.
  61. : and you only have John's say-so with regard to 506a...
  62. At some point I'd like to get somebody who has 5.0.6a and an external modem
  63. to build and test my working copy of C-Kermit 8.0 to see if:
  64.  
  65.  . The TIOCSDTR code gets included in tthang().
  66.  . SET MODEM HANGUP-METHOD RS232 really works.
  67.  . SHOW COMM displays the modem signals.
  68.  . Kermit automatically pops back to its prompt if CD drops during a
  69.    terminal session or file transfer.
  70.  
  71. The working sources are here:
  72.  
  73.   ftp://kermit.columbia.edu/kermit/test/tar/x.tar.gz (also .Z)
  74.  
  75. (Is the big difference between 5.0.5 and 5.0.6 or between 5.0.6 and 5.0.6a?)
  76.  
  77. Ditto for Unixware 7 and Open UNIX 8.
  78.  
  79. : One more trick you could do -- but which does more firmly tie you to
  80. : "sio".  If you're working on tty1a, open and close tty1A.  That should
  81. : be sufficient to kick RTS, DTR back to sanity.  And if you're working on
  82. : 1A then open/close 1a.  None of which is particularly pleasant.  I might
  83. : also be wrong in that _opening_ might fix RTS & DTR, but closing might
  84. : screw them up again, so you would need to open and keep open the "other"
  85. : device node.  (Then, next time you need to do something to force correct
  86. : RTS & DTR, close and reopen that "other" port.)
  87. Opening the "other" port after tcsetattr() makes DTR come on but not RTS.
  88. The behavior is the same if I close it or leave it open.
  89.  
  90. - Frank
  91.